package com.warren.ioc;

import com.warren.context.annotation.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author warren
 * @create 2021-08-18 21:39
 * @Description
 */
@Component
public class UserDao {

    private static Map<String, String> hashMap = new HashMap<>();

    static {
        hashMap.put("10001", "小傅哥，北京，亦庄");
        hashMap.put("10002", "八杯水，上海，尖沙咀");
        hashMap.put("10003", "阿毛，香港，铜锣湾");
    }

    public String queryUserName(String uId) {
        System.out.println(2);
        return hashMap.get(uId);
    }

}
